import {
    createRouter,
    createWebHashHistory,
    createWebHistory,
} from 'vue-router'

const routerHistory = createWebHistory()
import Page from './views/Page.vue'

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Page,
        children: [
            {
                path: '/',
                name: 'Home',
                redirect: '/Market',
            },

            {
                path: '/Market',
                name: 'Market',
                component: () => import('./views/Home/index.vue'),
                // component: App,
            },
            {
                path: '/Detailed',
                name: 'Detailed',
                component: () => import('./views/Detailed/Detailed.vue'),
                // component: App,
            },
            {
                path: '/MyArtworks',
                name: 'MyArtworks',
                component: () => import('./views/MyArtworks/MyArtworks.vue'),
                // component: App,
          },
          {
            path: '/Record',
            name: 'Record',
            component: () => import('./views/Record/index.vue'),
            // component: App,
        },
        ],
    },
]

const router = createRouter({
    linkActiveClass: 'router-link-active',
    history: routerHistory,
    routes: routes,
})

export default router
